Mac Rstudio 打开Rscript中文注释乱码的解决方法
在Rstudio中设置:
Tools -> Global Options -> Code -> Saving -> Default text encoding : (从列表里选择)GBK
然后回到Rstudio主界面,点击File -> Reopen with encoding ->Choosing: GBK
这样脚本文件的中文就可以正常显示啦!
(注:尝试过用utf-8,发现依然是乱码,不知道是什么原因)
在Rstudio中设置:
Tools -> Global Options -> Code -> Saving -> Default text encoding : (从列表里选择)GBK
然后回到Rstudio主界面,点击File -> Reopen with encoding ->Choosing: GBK
这样脚本文件的中文就可以正常显示啦!
(注:尝试过用utf-8,发现依然是乱码,不知道是什么原因)